﻿using System;
using System.Reflection;
using System.Windows.Forms;

namespace Module_Debug
{
    partial class Readme : Form
    {
        public Readme()
        {
            InitializeComponent();
        }

        #region Assembly Attribute Accessors



        public string AssemblyVersion
        {
            get
            {
                return Assembly.GetExecutingAssembly().GetName().Version.ToString();
            }
        }








        #endregion

        private void BtnHelp_Click(object sender, EventArgs e)
        {
            //string filename = MyOpenFileDialog();
            //axAcroPDF1.LoadFile("./update/PG使用说明.pdf");
            //axAcroPDF1.setView("Fit");

        }
        string MyOpenFileDialog()
        {
            OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "PDF文档(*.pdf)|*.pdf";
            if (ofd.ShowDialog() == DialogResult.OK) { return ofd.FileName; } else { return null; }
        }

        private void btnViewFormat_Click(object sender, EventArgs e)
        {
            Button btnTmp = (Button)sender;

            switch (btnTmp.Name)
            {
                case "btnViewFit":
                    {
                        //axAcroPDF1.setView("Fit");
                        break;
                    }
                default:
                case "btnViewFitH":
                    {
                        //axAcroPDF1.setView("FitH");
                    }
                    break;
                case "btnDownloadpdf":
                    {
                        string strDesktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
                        System.IO.File.Copy("./update/PG使用说明.pdf", strDesktopPath + "/PG使用说明.pdf", true);

                        MessageBox.Show("说明文件已经释放到桌面...", "陈峰提示");
                    }
                    break;
            }
        }
    }
}
